//-----------------------------------------------------------------------------
//----- CAGDBReactor.h : Declaration of the CAGDBReactor
//-----------------------------------------------------------------------------
#pragma once

#ifdef AGOBJECT_MODULE
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP
#endif

#include "dbmain.h"

class /*DLLIMPEXP*/ CAGDBReactor : public AcDbDatabaseReactor
{

public:
	ACRX_DECLARE_MEMBERS(CAGDBReactor);

protected:
	// Pointer to the document this reactor instance belongs to.
	AcDbDatabase* mpDatabase;

public:
	CAGDBReactor(AcDbDatabase* pDb = NULL);
	virtual ~CAGDBReactor();

	virtual void Attach(AcDbDatabase* pDb);
	virtual void Detach();
	virtual AcDbDatabase* Subject() const;
	virtual bool IsAttached() const;
	virtual void objectAppended(const AcDbDatabase* dwg, const AcDbObject* dbObj);
	virtual void objectModified(const AcDbDatabase* dwg, const AcDbObject* dbObj);
};

#ifdef AGOBJECT_MODULE
ACDB_REGISTER_OBJECT_ENTRY_AUTO(CAGDBReactor)
#endif
